package com.xin.data.simbapesa.fragment;

import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.viewbinding.ViewBinding;

import com.xin.data.simbapesa.activity.SimbaCustomerServiceActivity;
import com.xin.data.simbapesa.activity.SimbaFeedbackActivity;
import com.xin.data.simbapesa.activity.SimbaFeedbackOnlineActivity;
import com.xin.data.simbapesa.api.PU;
import com.xin.data.simbapesa.base.BaseActivity;
import com.xin.data.simbapesa.base.BaseFragment;
import com.xin.data.simbapesa.databinding.SimbaChatFragmentBinding;
import com.xin.data.simbapesa.utils.ViewUtils;

public class ChatFragment extends BaseFragment<SimbaChatFragmentBinding> {


    BaseActivity<ViewBinding> mActivity;


    @Override
    protected SimbaChatFragmentBinding initViewBinding(LayoutInflater inflater, ViewGroup container) {
        return SimbaChatFragmentBinding.inflate(inflater);
    }

    @Override
    protected void initView() {


        mActivity = (BaseActivity<ViewBinding>) getActivity();

        binding.getRoot().setPadding(0, 0, 0, 0);

        mActivity.setStatusBarHeight(binding.tvTop);


        binding.tvCs.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ViewUtils.viewScale(v);
                startActivity(new Intent(getActivity(), SimbaCustomerServiceActivity.class));
            }
        });

        binding.tvItem1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ViewUtils.viewScale(v);
                PU.userBuriedPoint(PU.P217, "1");
                startActivity(new Intent(getActivity(), SimbaCustomerServiceActivity.class));
            }
        });

        binding.tvItem2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ViewUtils.viewScale(v);
                PU.userBuriedPoint(PU.P217, "2");
                startActivity(new Intent(getActivity(), SimbaCustomerServiceActivity.class));
            }
        });

        binding.tvItem3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ViewUtils.viewScale(v);
                PU.userBuriedPoint(PU.P217, "3");
                startActivity(new Intent(getActivity(), SimbaFeedbackActivity.class));
            }
        });

        binding.tvItem4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ViewUtils.viewScale(v);
                PU.userBuriedPoint(PU.P217, "4");
                startActivity(new Intent(getActivity(), SimbaFeedbackActivity.class));
            }
        });

        binding.tvItem5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ViewUtils.viewScale(v);
                PU.userBuriedPoint(PU.P217, "5");
                Intent intent = new Intent(getActivity(), SimbaFeedbackOnlineActivity.class);
                intent.putExtra("code", 1);
                startActivity(intent);
            }
        });

        binding.tvItem6.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ViewUtils.viewScale(v);
                PU.userBuriedPoint(PU.P217, "6");
                Intent intent = new Intent(getActivity(), SimbaFeedbackOnlineActivity.class);
                intent.putExtra("code", 2);
                startActivity(intent);
            }
        });

        binding.tvItem7.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ViewUtils.viewScale(v);
                PU.userBuriedPoint(PU.P217, "7");
                Intent intent = new Intent(getActivity(), SimbaFeedbackOnlineActivity.class);
                intent.putExtra("code", 3);
                startActivity(intent);
            }
        });

        binding.tvItem8.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ViewUtils.viewScale(v);
                PU.userBuriedPoint(PU.P217, "8");
                Intent intent = new Intent(getActivity(), SimbaFeedbackOnlineActivity.class);
                intent.putExtra("code", 4);
                startActivity(intent);
            }
        });

        binding.tvItem9.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ViewUtils.viewScale(v);
                PU.userBuriedPoint(PU.P217, "9");
                Intent intent = new Intent(getActivity(), SimbaFeedbackOnlineActivity.class);
                intent.putExtra("code", 5);
                startActivity(intent);
            }
        });

    }

    @Override
    protected void initData() {
        UP_TYPE1 = PU.P218;
        UP_TYPE2 = PU.P219;
    }


}
